package com.ybkj.o2o.mc.controller.fresh;

import com.ybkj.o2o.mc.common.query.PassengerQuery;
import com.ybkj.o2o.mc.entity.Passenger;
import com.ybkj.o2o.mc.service.PassengerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author zhyu
 * @date
 */
@Controller
@RequestMapping("find")
public class PassengerNewController {

    @Autowired
    private PassengerService passengerService;

    @RequestMapping("introducerWithDate")
    @ResponseBody
    public List<Passenger>  findPassengersWithIntroducerBeforeDate(Long start, Long end){
        PassengerQuery query = new PassengerQuery();
        query.setStartTime(start);
        query.setEndTime(end);
        return passengerService.findPassengersWithIntroducerBeforeDate(query);
    }
}
